/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package wave;

import base.*;
import trackmsg.EchoMsg;
import base.TrackNode.Echo;

/**
 *
 * @author Quest
 */
public class ASTStopDoneExecution extends WaveExecution {

    public ASTStopDoneExecution(WaveHeadParser parser, WaveEnvironment waveEnv) {
        super(parser, waveEnv);
    }

    public void execute() {
        if (waveEnv.getTrackAddress() != null) {
            TrackNode currentTrack = wi.getTrackForest().
                    getTrackNode(waveEnv.getTrackAddress());
            wi.getTrackQueue().incoming(new EchoMsg(currentTrack, Echo.DONE));
        }
        Utilities.WPPrint("Stop DONE has done.");
    }
}
